/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package maestro;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import maestro.HiloEnviandoBroadcast;
import maestro.HiloEscuchandoDireccionesPC;
import interfaz_maaestro.*;

/**
 *
 * @author juan-arch
 */
public class MaestroMain {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        Registry reg;
        
            
        
        try {
            Maestro maestro = new Maestro();
            reg = LocateRegistry.createRegistry(1099);
            reg.bind("maestro", maestro); 
            System.out.println("Coordinador Arriba");
            Thread.sleep(8000);
//            maestro.llamarEsclavos("10.5.2.102");
           System.out.println(maestro.infoMemoria("10.5.2.102"));
           System.out.println(maestro.retornarMapa()); 
            
        } catch (Exception ex) {
            Logger.getLogger(MaestroMain.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        
    }
    
      
    
   
    
   
    
}
